from rest_framework import serializers
from . import models
# class Userserializers(serializers.ModelSerializer):
#     class Meta:
#         modle = models.Login
#         fields = '__all__'
#

class Userserializers(serializers.Serializer):
    username=serializers.CharField(max_length=32)
    password=serializers.CharField(max_length=1000)
    # total_comment=serializers.IntegerField()
    # total_views=serializers.IntegerField()
    def create(self, validated_data):
        return models.Login.objects.create(**validated_data)